The present disclosure relates to data transmission using a synchronous serial data bus. Inter-integrated circuit (I2C) and serial peripheral interface (SPI) are popular electronic data exchange protocols for serial data transmission. Consider, for example, the SPI bus. Referring to FIG. 1A, the SPI bus is defined on four signal lines, a clock signal named SCK is sent from a bus master 102 to one or more slave devices 104. The remaining SPI signals are synchronous to SCK. The bus master 102 may have a chip select signal (CS0, CS1) for each slave device 104. The bus master 102 can send data over a data line (master-out-slave-in, MOSI) to the slave devices 104. The bus master 102 can receive data from the slave devices 104 over a common data line (master-in-slave-out, MISO).
Synchronous serial data buses are often used on printed circuit boards to connect sensors to a host processor. FIG. 1A shows a typical arrangement of an SPI bus with one master device 102 and two slave devices 104. In this example, the master device 102 sends data on the MOSI line and receives data on the MISO line. Referring to the timing diagram in FIG. 1B, data is valid on the rising edge of the SCK line according to the SPI protocol, and thus data can be read in on the rising edge of SCK. A select line is dedicated to each slave device 104. The bus master 102 selects a slave device 104 by pulling the corresponding chip select line (e.g., CS0) low and activating the clock signal SCK at a suitable clock frequency. This kind of bus arrangement works well on a printed circuit board where the line lengths are relatively short. It does not work well, however, on a long cable where ringing can make data transmission unreliable.
If the clock line for SCK is some distance from the clock source, ringing on the clock line can introduce spurious clock pulses on SCK, which can add unintended bits to the data stream. Ringing usually limits the distance between the clock source and the clock receiver in I2C, SPI, and other synchronous serial protocols to a few inches. Ringing is a phenomena in digital circuits in which a pulse sent over a wire can become distorted and can be received as multiple pulses. FIG. 2A depicts an electrical model of a transmission line. FIG. 2B represents an ideal digital pulse (IN), and shows what might actually appear at the output terminal (OUT) of the transmission line. Ringing is usually associated with inductance in the transmission line. The longer the transmission line, the greater the inductance in the line, and the greater is the likelihood that ringing will occur. FIG. 2C illustrates in more detail the nature of the ringing that is diagrammatically represented in FIG. 2B.
Most attempts to work around ringing do so by trying to eliminate or suppress the ringing. Solutions typically involve adding Schmitt triggers, capacitors, or impedance matching resistors at each end of the clock line. While these techniques can be effective, they have several drawbacks. In addition to adding to system cost, adding capacitors and terminating resistors limits the speed of the digital pulses. Worse yet, for these techniques to work the user needs to know the inductance of the cable carrying the pulses, and design a solution for those parameters. A given solution designed for one configuration is not likely to work in another configuration. None of these techniques adequately address ringing when dealing with cables of an unknown length or inductance.